 <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta charset="UTF-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>Document</title>
     <script>
         function yueshuhe(a){
             var sum = 0;
             for(var i = 1;i < a;i++){
                if(a % i ===0){
                    sum += i;
                }
             }
             return sum;
         }
         function isqinmi(a){
             var b = yueshuhe(a);
             if(yueshuhe(b) === a && a != b){
                 return true;
             }else{
                 return false;
             }
         }
         for(var i=0;i<=2000;i++){
            var j = isqinmi(i);
            if(isqinmi(i) && j <=2000){
                console.log(i,j);
            }
         }

     </script>
 </head>
 <body>
     
 </body>
 </html>